﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Pay.Data;
using Pay.DTO;
using Pay.DTO.card;
using Pay.TO;

namespace Pay.IService {
    public interface ICartService {
        int Add(cart_dto dto);
        /// <summary>
        /// token 商城 加入购物车
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int AddTokenCart(AddCartModel model);
        PagedResult<cart_dto> GetList(CartQuery query);
        /// <summary>
        /// 购物车商品
        /// </summary>
        /// <param name="merchant_id"></param>
        /// <returns></returns>
        cart_info_dto GetTokenCartList(long merchant_id);
        /// <summary>
        /// 更新购物车
        /// </summary>
        /// <param name="id"></param>
        /// <param name="merchant_id"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        int UpdateCart(long id, long merchant_id, int type);
        int Delete(long Id);
        int DeleteTokenCart(List<long> ids, long merchant_id);
        /// <summary>
        /// 购物车数量
        /// </summary>
        /// <param name="merchant_id"></param>
        /// <returns></returns>
        int GetCartCount(long merchant_id);
    }
}
